package com.ruoyi.studymeeting.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.studymeeting.mapper.StudyMeetingMapper;
import com.ruoyi.studymeeting.domain.StudyMeeting;
import com.ruoyi.studymeeting.service.IStudyMeetingService;

/**
 * 应知应会Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-27
 */
@Service
public class StudyMeetingServiceImpl implements IStudyMeetingService 
{
    @Autowired
    private StudyMeetingMapper studyMeetingMapper;

    /**
     * 查询应知应会
     * 
     * @param id 应知应会主键
     * @return 应知应会
     */
    @Override
    public StudyMeeting selectStudyMeetingById(Long id)
    {
        return studyMeetingMapper.selectStudyMeetingById(id);
    }

    /**
     * 查询应知应会列表
     * 
     * @param studyMeeting 应知应会
     * @return 应知应会
     */
    @Override
    public List<StudyMeeting> selectStudyMeetingList(StudyMeeting studyMeeting)
    {
        return studyMeetingMapper.selectStudyMeetingList(studyMeeting);
    }

    /**
     * 新增应知应会
     * 
     * @param studyMeeting 应知应会
     * @return 结果
     */
    @Override
    public int insertStudyMeeting(StudyMeeting studyMeeting)
    {
        studyMeeting.setCreateTime(DateUtils.getNowDate());
        return studyMeetingMapper.insertStudyMeeting(studyMeeting);
    }

    /**
     * 修改应知应会
     * 
     * @param studyMeeting 应知应会
     * @return 结果
     */
    @Override
    public int updateStudyMeeting(StudyMeeting studyMeeting)
    {
        return studyMeetingMapper.updateStudyMeeting(studyMeeting);
    }

    /**
     * 批量删除应知应会
     * 
     * @param ids 需要删除的应知应会主键
     * @return 结果
     */
    @Override
    public int deleteStudyMeetingByIds(Long[] ids)
    {
        return studyMeetingMapper.deleteStudyMeetingByIds(ids);
    }

    /**
     * 删除应知应会信息
     * 
     * @param id 应知应会主键
     * @return 结果
     */
    @Override
    public int deleteStudyMeetingById(Long id)
    {
        return studyMeetingMapper.deleteStudyMeetingById(id);
    }
}
